package org.fosis.dev;

import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class helloAndroidActivity extends Activity implements OnClickListener {
	private static final String TAG = "Tasbeeh";
	Button btnPlus;
	TextView txtCountValue;
	int value = 0;
	List<Dhikr> adhkar;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        //Get buttons through their relevant id's
        Log.d(TAG, "Getting components id's");
        btnPlus = (Button) findViewById(R.id.btnPlus);
        txtCountValue = (TextView) findViewById(R.id.txtCountValue);
        
        //Initialise components
        Log.d(TAG, "Initialising components");
        txtCountValue.setText(String.valueOf(value));
        btnPlus.setOnClickListener(this);
//        adhkar = new List<Dhikr>();
        
    }

	@Override
	public void onClick(View src) {
		switch(src.getId()){
		case R.id.btnPlus:
			value++;
			updateCount();
			break;
			default:
		}
		
	}

	private void updateCount() {
		txtCountValue.setText(String.valueOf(value));
	}

}

class Dhikr {
	int frequency;
	String phrase;
}